package com.mscenter.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import com.mscenter.model.ApplicationInfo;
import com.mscenter.service.MsCenterService;
import com.spring4all.swagger.EnableSwagger2Doc;

@EnableSwagger2Doc
@Controller
public class MsCenterController {

	@Autowired
	private MsCenterService msCenterService;
	
	@GetMapping("/appinfo")
	public String listAppInfo(HttpServletRequest request){
		List<ApplicationInfo> appInfoList=msCenterService.listAppInfos();
		request.setAttribute("appInfoList", appInfoList);
		return "mscenter";
	}
	
}
